<!DOCTYPE html>
<html lang="zh-CN" xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">
<head th:include="/common/inc::header"/>
<body>
<form class="layui-form" style="margin-top: 15px">
    <div class="layui-form-item">
        <label class="layui-form-label" style="width: 60px">考生姓名:</label>
        <div class="layui-input-inline">
            <input type="text" name="examineeName" id="examineeName"
                   class="layui-input">
        </div>
        <button class="layui-btn" id="searchBtn" lay-submit lay-filter="searchBtn">查询</button>
    </div>
</form>
<table class="layui-table" id="grid" lay-filter="grid">
</table>
<script th:replace="/common/inc::incJs"></script>
<style type="text/css">
    .layui-table-header {
        width: 1078px;
    }
</style>
<script>
    var allStr;
    var examineeArrangeRecordId = getQueryString("examineeArrangeRecordId");

    layui.use('laydate', function () {
        var laydate = layui.laydate;

        //执行一个laydate实例
        laydate.render({
            elem: '#startTime', //指定元素
            format: 'yyyy-MM-dd'
        });
        //执行一个laydate实例
        laydate.render({
            elem: '#endTime', //指定元素
            format: 'yyyy-MM-dd'
        });
    });

    $(function () {
        var tableIns = createTable({
            url: '/backend/security/examineeArrangeRecordInfo/getList?id=' + examineeArrangeRecordId,
            cols: [[
                {field: 'examineeName', title: '考生姓名', width: 180}, {
                    field: 'idCard',
                    title: '身份证',
                    width: 180
                }, {field: 'examineeInstitution', title: '所属机构', width: 180}, {
                    field: 'isPay',
                    title: '是否缴费',
                    width: 180,
                    templet: '#payTpl'
                }
            ]]
        });

        layui.form.on('submit(searchBtn)', function (data) {
            tableIns.reload({
                where: data.field
            });
            return false;
        });
    })
</script>
<script type="text/html" id="payTpl">
    {{#  if(d.isPay ===1){ }}
    <span style="color: green;">已缴费</span>
    {{#  } else { }}
    <span style="color: #FF0000;">未缴费</span>
    {{#  } }}
</script>
</body>
</html>
